package com.rankeiot.platform.domain;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.FieldNameConstants;
import org.sagacity.sqltoy.config.annotation.Column;
import org.sagacity.sqltoy.config.annotation.Entity;
import org.sagacity.sqltoy.config.annotation.Id;

import java.io.Serializable;
import java.sql.Types;
import java.util.Date;

/**
 * 定时任务信息
 * @author desire
 */
@Schema(description = "定时任务")
@Data
@Entity(tableName = "t_job_info")
@FieldNameConstants
public class JobInfo implements Serializable {
    /**
     * 任务ID
     */
    @Id
    @Column(name = "id",type = Types.VARCHAR,length = 50)
    private String id;
    @Column(name = "title",type = Types.VARCHAR,length = 50)
    private String title;
    @Column(name = "cron",type = Types.VARCHAR,length = 50)
    private String cron;
    @Column(name = "memo",type = Types.VARCHAR,length = 255)
    private String describe;
    @Column(name = "last_time",type = Types.TIMESTAMP)
    private Date lastTime;
    @Column(name = "next_time",type = Types.TIMESTAMP)
    private Date nextTime;
    @Column(name = "enable",type = Types.TINYINT)
    private Boolean enable;
}
